<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2020/8/24
  Time: 9:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="_linkPages/basePath.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>后台管理系统-HTML5后台管理系统</title>
    <meta name="keywords"  content="设置关键词..." />
    <meta name="description" content="设置描述..." />
    <meta name="author" content="DeathGhost" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <link rel="icon" href="static/images/icon/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" type="text/css" href="static/css/styleAdmin.css" />
    <script src="static/js/jqueryAdmin.js"></script>
    <script src="static/js/plug-ins/customScrollbar.min.js"></script>
    <script src="static/js/plug-ins/echarts.min.js"></script>
    <script src="static/js/plug-ins/layerUi/layer.js"></script>
    <script src="static/js/plug-ins/pagination.js"></script>
    <script src="static/js/public.js"></script>
</head>
<body>
<div class="main-wrap">
    <div class="side-nav">
        <%@ include file="_linkPages/leftBar.jsp"%>
        <%@ include file="_linkPages/footer.jsp"%>
    </div>
    <div class="content-wrap">
        <%@ include file="_linkPages/rightBar.jsp"%>
        <main class="main-cont content mCustomScrollbar">
            <!--开始::内容-->
            <div class="page-wrap">

                <i class="ace-icon fa fa-check green"></i>

                <strong class="green">最新公告：</strong>
                欢迎来到果瓣_都市宝后台管理系统 v1.0
                <div class="row center">
                    <img src="static/images/zl2-01.gif" />
                </div>
            </div>


            <script>
                //分页
                $(".pagination").createPage({
                    pageCount:5,
                    current:1,
                    backFn:function(p){
                        console.log(p);
                    }
                });
                //demo1
                var dom = document.getElementById("demo1");
                var myChart = echarts.init(dom);
                var app = {};
                option = null;
                function randomData() {
                    now = new Date(+now + oneDay);
                    value = value + Math.random() * 21 - 10;
                    return {
                        name: now.toString(),
                        value: [
                            [now.getFullYear(), now.getMonth() + 1, now.getDate()].join('/'),
                            Math.round(value)
                        ]
                    }
                }

                var data = [];
                var now = +new Date(1997, 9, 3);
                var oneDay = 24 * 3600 * 1000;
                var value = Math.random() * 1000;
                for (var i = 0; i < 1000; i++) {
                    data.push(randomData());
                }

                option = {
                    tooltip: {
                        trigger: 'axis',
                        formatter: function (params) {
                            params = params[0];
                            var date = new Date(params.name);
                            return date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear() + ' : ' + params.value[1];
                        },
                        axisPointer: {
                            animation: false
                        }
                    },
                    xAxis: {
                        type: 'time',
                        splitLine: {
                            show: false
                        }
                    },
                    yAxis: {
                        type: 'value',
                        boundaryGap: [0, '100%'],
                        splitLine: {
                            show: false
                        }
                    },
                    series: [{
                        name: '模拟数据',
                        type: 'line',
                        showSymbol: false,
                        hoverAnimation: false,
                        data: data
                    }]
                };

                setInterval(function () {

                    for (var i = 0; i < 5; i++) {
                        data.shift();
                        data.push(randomData());
                    }

                    myChart.setOption({
                        series: [{
                            data: data
                        }]
                    });
                }, 1000);;
                if (option && typeof option === "object") {
                    myChart.setOption(option, true);
                }

                //demo2
                var dom = document.getElementById("demo2");
                var myChart = echarts.init(dom);
                var app = {};
                option = null;
                option = {
                    tooltip: {
                        trigger: 'axis'
                    },
                    grid: {
                        left: '3%',
                        right: '4%',
                        bottom: '3%',
                        containLabel: true
                    },
                    xAxis: {
                        type: 'category',
                        boundaryGap: false,
                        data: ['周一','周二','周三','周四','周五','周六','周日']
                    },
                    yAxis: {
                        type: 'value'
                    },
                    series: [
                        {
                            name:'邮件营销',
                            type:'line',
                            stack: '总量',
                            data:[120, 132, 101, 134, 90, 230, 210]
                        },
                        {
                            name:'联盟广告',
                            type:'line',
                            stack: '总量',
                            data:[220, 182, 191, 234, 290, 330, 310]
                        },
                        {
                            name:'视频广告',
                            type:'line',
                            stack: '总量',
                            data:[150, 232, 201, 154, 190, 330, 410]
                        },
                        {
                            name:'直接访问',
                            type:'line',
                            stack: '总量',
                            data:[320, 332, 301, 334, 390, 330, 320]
                        },
                        {
                            name:'搜索引擎',
                            type:'line',
                            stack: '总量',
                            data:[820, 932, 901, 934, 1290, 1330, 1320]
                        }
                    ]
                };
                ;
                if (option && typeof option === "object") {
                    myChart.setOption(option, true);
                }
            </script>
            <!--开始::结束-->
        </main>

    </div>
</div>
</body>
</html>

